package com.jiepos.mpos.job;

import org.springframework.beans.factory.annotation.Autowired;

import com.jiepos.mpos.biz.transaction.service.TransSummaryService;
import com.jiepos.mpos.core.util.DateUtil;

/**
 * @ClassName: TransSummaryJob
 * @Description: 交易分组汇总任务
 * @author 孙永
 * @date 2017年11月9日 下午7:46:12
 */
public class TransSummaryJob {
	
	@Autowired
	private TransSummaryService transSummaryService;
	
	/*T1汇总数据*/
	public void summaryJob(){
		transSummaryService.transSummary(null, null);
	}

	/*每月汇总数据*/
	public void summaryMonthJob(){
		String beginDate = DateUtil.getLastMonthFirstDay(null);
		String endDate = DateUtil.getCurrentMonthFirstDay(null);
		String dirName = DateUtil.getLastMonth(null);
		transSummaryService.transSummary(beginDate, endDate, dirName);
	}
}
